<template>
  <div id="pageWindow" class="new-season">
    <header>
      <div><img :src="pagePicArr[0]"></div>
      <a href="javascript:;" id="share" onclick="share('春夏上新', '春夏上新', '');">
        <img src="https://mstatic.shandjj.com/default/common/common-images/share_white.png">
      </a>
      <div><img :src="pagePicArr[1]"></div>
    </header>
    <div><img :src="pagePicArr[2]"></div>
    <div class="new-goods clearfix">
      <div class="list" v-for="(list,index) in newGoods" :key="index" @click="goodsDetail(list.goods_id)">
        <div><img :src="list.img320_url" alt=""></div>
        <p class="title">{{list.goods_name}}</p>
        <p class="price">￥{{list.flash_price}}</p>
      </div>
    </div>
    <div><img :src="pagePicArr[4]"></div>
    <div style="position:relative;">
      <img :src="pagePicArr[13]">
      <div class="width_33_1" onclick="jump2special(62055)"></div>
      <div class="width_33_2" onclick="jump2special(62141)"></div>
      <div class="width_33_3" onclick="jump2special(62321)"></div>
    </div>
    <div style="position:relative;">
      <img :src="pagePicArr[14]">
      <div class="width_33_1" onclick="jump2special(62323)"></div>
      <div class="width_33_2" onclick="jump2special(62155)"></div>
      <div class="width_33_3" onclick="jump2special(62349)"></div>
    </div>
    <div><img :src="pagePicArr[6]"></div>
    <div style="position:relative;">
      <img :src="pagePicArr[15]">
      <div class="width_33_1" onclick="jump2special(62227)"></div>
      <div class="width_33_2" onclick="jump2special(62221)"></div>
      <div class="width_33_3" onclick="jump2special(62207)"></div>
    </div>
    <div style="position:relative;">
      <img :src="pagePicArr[16]">
      <div class="width_33_1" onclick="jump2special(62057)"></div>
      <div class="width_33_2" onclick="jump2special(61885)"></div>
      <div class="width_33_3" onclick="jump2special(62203)"></div>
    </div>
    <div><img :src="pagePicArr[8]"></div>
    <div style="position:relative;">
      <img :src="pagePicArr[17]">
      <div class="width_33_1" onclick="jump2special(62307)"></div>
      <div class="width_33_2" onclick="jump2special(61823)"></div>
      <div class="width_33_3" onclick="jump2special(61843)"></div>
    </div>
    <div style="position:relative;">
      <img :src="pagePicArr[18]">
      <div class="width_33_1" onclick="jump2special(61969)"></div>
      <div class="width_33_2" onclick="jump2special(62309)"></div>
      <div class="width_33_3" onclick="jump2special(61835)"></div>
    </div>
    <div><img :src="pagePicArr[10]"></div>
    <div style="position:relative;">
      <img :src="pagePicArr[19]">
      <div class="width_33_1" onclick="jump2special(61499)"></div>
      <div class="width_33_2" onclick="jump2special(62083)"></div>
      <div class="width_33_3" onclick="jump2special(62219)"></div>
    </div>
    <div style="position:relative;">
      <img :src="pagePicArr[20]">
      <div class="width_33_1" onclick="jump2special(62191)"></div>
      <div class="width_33_2" onclick="jump2special(62017)"></div>
      <div class="width_33_3" onclick="jump2special(62251)"></div>
    </div>
    <div><img :src="pagePicArr[12]"></div>
    <div class="more"></div>
    <!-- 加载动画 -->
    <div class="loading_box"><div class="load"><div class="circle2"></div><p>闪</p> </div></div>
    <!--返回顶部-->
    <span id="return-top"><img src="https://mstatic.shandjj.com/default/common/common-images/list_numb_press1@2x.png"></span>
  </div>
</template>
<script>
  import { backTop } from 'assets/js/sdjjPublic.js'
  import BaseUrl from '@/utils/ajaxRequest.js'
  import { resetAddress } from '@/utils/utils.js'
  export default {
    name:'superSeckill',
    data() {
      return {
        userId:'',
        setLinkString:'',//图片的基本地址
        pageName:'clothesSub',//图片分类的名称
        defaultList:0,
        pagePicArr:[],
        newGoods:[],
      }
    },
    created(){
      this.userId=window.person.user_id;
      this.formatImgLink();
      this.getGoods();
    },
    mounted(){
      backTop("return-top");
      cloArea('62055,61971,62233,61835,62219,62257,62223,62227,61867,62251,62141,62207,62057,62013,62221,61969,61499,62017,62321,62059,62213,62309,62079,62127,62143,62433,62301,62145,62205,62201,62307,61973,62417,61885,61839,62215,62031,62349,61793,62305,62095,62155,62431,61823,62109,62125,62139,62203,61833,62135,62323,62199,61961,62191,62161,62229,61865,61981,62027,62313,61893,62111,62083,62425,62197,61827,62073,62063,62189,62195,61831,62193,62429');
    },
    methods: {
      getGoods(){
        var _this=this;
        var ajaxt = '?t=' + new Date().getTime();
        $.get({
          url:`${BaseUrl}/index.php/goods/goodsList`+ajaxt,
          async: true,
          dataType: "json",
          data:{ goodsIds:'1465915,1419499,1459121,1493067,1490149,1498013,1495159,1481565,1498239'},
          success:function(res){
            if(res.code==200&&res.status=='success'){
              var responseData=res.data;
              _this.newGoods=responseData;
            }
          }
        })
      },
      goodsDetail(goodsId){jump2good(goodsId);},
      //处理静态资源地址
      formatImgLink(){
        var tempLink=resetAddress();
        if(tempLink.type=='devLine'){
          this.setLinkString=`${tempLink.assetsLink}/default/ActiveImg/celebration/img/`;
        }else if(tempLink.type=='testLine'){
          this.setLinkString=`${tempLink.assetsLink}/default/ActiveImg/celebration/img/`;
        }else if(tempLink.type=='onLine'){
          this.setLinkString=`${tempLink.assetsLink}/default/ActiveImg/celebration/img/`;
        };
        this.pagePicArr=[
          this.setLinkString+"pic60001.jpg",
          this.setLinkString+"pic60002.jpg",
          this.setLinkString+"pic60003.jpg",
          this.setLinkString+"pic60004.jpg",
          this.setLinkString+"pic60005.jpg",
          this.setLinkString+"pic60006.jpg",
          this.setLinkString+"pic60007.jpg",
          this.setLinkString+"pic60008.jpg",
          this.setLinkString+"pic60009.jpg",
          this.setLinkString+"pic60010.jpg",
          this.setLinkString+"pic60011.jpg",
          this.setLinkString+"pic60012.jpg",
          this.setLinkString+"pic60013.jpg",
          this.setLinkString+"pic60014.jpg",
          this.setLinkString+"pic60015.jpg",
          this.setLinkString+"pic60016.jpg",
          this.setLinkString+"pic60017.jpg",
          this.setLinkString+"pic60018.jpg",
          this.setLinkString+"pic60019.jpg",
          this.setLinkString+"pic60020.jpg",
          this.setLinkString+"pic60021.jpg"
        ];
      },
    }
  }
</script>

<style >
body{background: #620014;}
.new-season {
  width: 100%;
  height: 100%;
  position: relative;
}
#share {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0.15rem 0.3rem;
  position: absolute;
  top: 0.5rem;
  right: 0.2rem;
  box-sizing: content-box;
}
.new-goods{
  padding: 0 0.25rem;
  background: #010F7A;
}
.list{
  float: left;
  width:2.25rem;
  height: 100%;
  margin: 0.08rem 0.0rem 0rem 0rem;
  padding: 0.03rem;
  background: #fff;
  margin-right: 0.12rem;
  border:1px solid #333;
}
.list:nth-child(3n){
  margin-right: 0;
}
.list img{
  width: 100%;
  border:none;
  vertical-align: middle;
} 
.list .title{
  width: 100%;
  line-height: 0.32rem;
  height: 0.32rem;
  font-size: 0.28rem;
  color: #333;
  text-align: center;
  margin: 0.1rem 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
} 
.list .price{
  width: 100%;
  line-height: 0.36rem;
  font-size: 0.24rem;
  margin-bottom: 0.05rem;
  color: #A62F00;
  background: #FFD100;
  text-align: center;
  white-space: nowrap;
  border-radius: 0.3rem;
}
.part{
  padding: 0 0.13rem 0 0.13rem;
  background: #620014;
}
.sport .inner{background: #D10252;}
.clothes .inner{background: #975AFF;}
.shoes .inner{background: #FF942F;}
.digital .inner{background: #1391E5;}
.inner{padding: 0 0.06rem;}
</style>